﻿

namespace Forest.Lion.Web.Models.Company {
    using System;
    using System.ComponentModel.DataAnnotations;
    using Forest.Lion.Domain.Contracts;
    using System.Web.Mvc;
    using System.Collections.Generic;

    public class CompanyFormModel : ICompanyFormModel {

        public CompanyFormModel() {
            AvailableIndustres = new List<SelectListItem>();
            AvailableCompanyTypes = new List<SelectListItem>();
        }

        public Guid Id { get; set; }

        [Display(Name = "公司名称")]
        [Required(ErrorMessage = "请填写公司名称")]
        [StringLength(50, ErrorMessage = "请输入有效公司名称")]
        public string CompanyName { get; set; }

        [Display(Name = "简称")]
        [StringLength(10, ErrorMessage = "请输入有效简称")]
        public string ShortName { get; set; }

        [Display(Name = "拼音缩写")]
        public string Shortcut { get; set; }

        [Display(Name = "主营行业")]
        [Required(ErrorMessage = "请填写主营行业")]
        public int? Industry { get; set; }
        public IList<SelectListItem> AvailableIndustres { get; set; }

        [Display(Name = "公司性质")]
        [Required(ErrorMessage = "请填写公司性质")]
        public int? CompanyType { get; set; }
        public IList<SelectListItem> AvailableCompanyTypes { get; set; }

        [Display(Name = "公司规模")]
        [Required(ErrorMessage = "请填写公司规模")]
        [Range(1, 100000, ErrorMessage = "请输入有效公司规模")]
        public int? Employees { get; set; }

        [Display(Name = "营业执照号")]
        [Required(ErrorMessage = "请填写营业执照号")]
        [StringLength(50, ErrorMessage = "请输入有效营业执照号")]
        public string BusinessLicense { get; set; }

        [Display(Name = "注册资金")]
        [Required(ErrorMessage = "请填写注册资金")]
        [Range(5,1000000,ErrorMessage="请输入有效的注册资金：5～100000万之间")]
        public int? RegisteredCapital { get; set; }

        [Display(Name = "成立日期")]
        [Required(ErrorMessage = "请填写成立时间")]
        public DateTime? EstablishedOn { get; set; }

        [Display(Name = "公司简介")]
        [Required(ErrorMessage = "请填写公司简介")]
        public string Overview { get; set; }

        [Display(Name = "事业内容")]
        [Required(ErrorMessage = "请填写事业内容")]
        public string Business { get; set; }

        [Display(Name = "省")]
       // [Required(ErrorMessage = "请填写省")]
        public int? Province { get; set; }

        [Display(Name = "市")]
        //[Required(ErrorMessage = "请填写市")]
        public int? City { get; set; }

        [Display(Name = "详细地址")]
        [Required(ErrorMessage = "请填写详细地址")]
        [StringLength(100, ErrorMessage = "请输入有效详细地址")]
        public string Address { get; set; }

        [Display(Name = "邮政编码")]
        [Required(ErrorMessage = "请填写邮政编码")]
        [StringLength(6, ErrorMessage = "请输入有效邮政编码")]
        public string PostalCode { get; set; }

        [Display(Name = "联系人")]
        [Required(ErrorMessage = "请填写联系人")]
        [StringLength(15, ErrorMessage = "请输入有效联系人")]
        public string Contact { get; set; }

        [Display(Name = "电话")]
        [Required(ErrorMessage = "请填写电话")]
        [StringLength(20, ErrorMessage = "请输入有效电话")]
        public string Tel { get; set; }

        [Display(Name = "传真")]
        [StringLength(20, ErrorMessage = "请输入有效传真")]
        public string Fax { get; set; }

        [Display(Name = "移动电话")]
        //[Required(ErrorMessage = "请填写移动电话")]
        [StringLength(20, ErrorMessage = "请输入有效移动电话")]
        public string Mobile { get; set; }

        [Display(Name = "电子邮件")]
        [StringLength(100, ErrorMessage = "请输入有效电子邮件")]
        public string Email { get; set; }

        [Display(Name = "公司网站")]
        [StringLength(100, ErrorMessage = "请输入有效公司网站")]
        public string WebSite { get; set; }

        [Display(Name = "所属园区")]
        public int? Park { get; set; }

        [Display(Name = "是否启用短名称")]
        public bool? EnableShortName { get; set; }

        [Display(Name = "显示模板")]
        public Guid? TemplateId { get; set; }

    }


}